package com.woniu.new_orange.staff_module_dong.service.impl;

import com.woniu.new_orange.entity.Staff;
import com.woniu.new_orange.mapper.StaffMapper;
import com.woniu.new_orange.staff_module_dong.dto.StaffDto;
import com.woniu.new_orange.staff_module_dong.service.StaffService;
import com.woniu.new_orange.staff_module_dong.vo.StaffVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Program: new_orange->StaffServiceImpl
 * @Description:
 * @Author: donghang
 * @Date: 2023-01-14 10:02
 * @Version： 1.0
 **/
@Service
public class StaffServiceImpl implements StaffService {

    @Autowired
    private StaffMapper staffMapper;

    @Override
    public Staff staffLogin(StaffDto staffDto) {
        return staffMapper.staffLogin(staffDto);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return staffMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Staff record) {
        return staffMapper.insert(record);
    }

    @Override
    public int insertSelective(Staff record) {
        return staffMapper.insertSelective(record);
    }

    @Override
    public Staff selectByPrimaryKey(Long id) {
        return staffMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Staff record) {
        return staffMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Staff record) {
        return staffMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<StaffVo> selStaffByLike(StaffDto staffDto) {
        return staffMapper.selStaffByLike(staffDto);
    }

    @Override
    public Staff loginByEmail(StaffDto staffDto) {
        return staffMapper.loginByEmail(staffDto);
    }

    @Override
    public Staff loginByPhone(StaffDto staffDto) {
        return staffMapper.loginByPhone(staffDto);
    }

    @Override
    public List<Staff> selByDeptId(Long deptId) {
        return staffMapper.selByDeptId(deptId);
    }
}
